<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/** @var \Magento\Wishlist\Block\Catalog\Product\View\AddTo\Wishlist $block */
?>
<?php if ($block->isWishListAllowed()) : ?>
    <a href="#"
       class="action towishlist"
       data-post='<?php /* @noEscape */ echo $block->getWishlistParams(); ?>'
       data-action="add-to-wishlist"><span><?php echo $block->escapeHtml(__('Add to Wish List')) ?></span></a>
<?php endif; ?>
<script type="text/x-magento-init">
    {
        "body": {
            "addToWishlist": <?php /* @noEscape */ echo $block->getWishlistOptionsJson() ?>
        }
    }
</script>
